
export const countInitState = { count: 0 };
export interface InterAction{
    type:'setCount',
    // payload:Partial<typeof countInitState>
}
export const countReducer = (state:typeof countInitState, action:InterAction) => {
    switch (action.type) {
        case 'setCount': return Object.assign({}, state, { count: state.count+1 });
        default: return state;
    }
}